//
//  HotListViewController.m
//  Computer
//
//  Created by qianfeng on 15/10/21.
//  Copyright © 2015年 qianfeng. All rights reserved.
//

#import "HotListViewController.h"
#import "Header.h"
#import "Net.h"
@interface HotListViewController ()

@end

@implementation HotListViewController

-(instancetype)initWithTitle:(NSString *)title{
    if (self = [super init]) {
        self.title = title;
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self createBarButtonLeftTitle:@"返回" leftImage:@"button_more" rightTitle:@"攒机" rightImage:@"button_more"];
    [self sendHttpRequest];
}

#pragma mark -net访问服务器-
-(void)sendHttpRequest{
    [Net getHttpURL:[NSString stringWithFormat:HOTLIST,self.number] completation:^(id object) {
        NSLog(@"=========");
    } failure:^(NSError *error) {
    }];
}

#pragma mark -navigation左右按钮回调-
-(void)leftBarButtonClick:(UIBarButtonItem *)btn{
    [self.navigationController popViewControllerAnimated:YES];
}
-(void)rightBarButtonClick:(UIBarButtonItem *)btn{
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    return nil;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    NSLog(@"点击了%ld行",indexPath.row);
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
